Error: COMPILER_WARNING (CWE-704): [#def1] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1215:9: warning[-Wdiscarded-qualifiers]: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier # 1213| static volatile gsize type_id_volatile = 0; # 1214| # 1215|-> if (g_once_init_enter(&type_id_volatile)) # 1216| { # 1217| /* Error: COMPILER_WARNING: [#def2] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1276:53: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1274| item = hit_test(desktop, &it, x - x_pos, y - y_pos); # 1275| if (item) # 1276|-> obj_l = fm_desktop_find_accessible_for_item(FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(component), item); # 1277| if (obj_l) # 1278| return g_object_ref(obj_l->data); Error: COMPILER_WARNING: [#def3] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1298:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1296| # 1297| desktop = FM_DESKTOP(widget); # 1298|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection); # 1299| item = g_list_nth_data(priv->items, i); # 1300| if (!item) Error: COMPILER_WARNING: [#def4] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1329:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1327| return NULL; # 1328| # 1329|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection); # 1330| for (items = priv->items; items; items = items->next) # 1331| { Error: COMPILER_WARNING: [#def5] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1342:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1340| static gint fm_desktop_accessible_get_selection_count(AtkSelection *selection) # 1341| { # 1342|-> FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection); # 1343| FmDesktopItemAccessible *item; # 1344| GList *items; Error: COMPILER_WARNING: [#def6] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1359:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1357| gint i) # 1358| { # 1359|-> FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection); # 1360| FmDesktopItemAccessible *item = g_list_nth_data(priv->items, i); # 1361| Error: COMPILER_WARNING: [#def7] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1382:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1380| desktop = FM_DESKTOP(widget); # 1381| # 1382|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection); # 1383| for (items = priv->items; items; items = items->next) # 1384| { Error: COMPILER_WARNING: [#def8] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1428:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1426| return FALSE; # 1427| # 1428|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(data); # 1429| priv->action_idle_handler = 0; # 1430| widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(data)); Error: COMPILER_WARNING: [#def9] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1445:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1443| return FALSE; # 1444| # 1445|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(action); # 1446| if (!priv->action_idle_handler) # 1447| priv->action_idle_handler = gdk_threads_add_idle(fm_desktop_accessible_idle_do_action, action); Error: COMPILER_WARNING: [#def10] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1481:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1479| static void fm_desktop_accessible_finalize(GObject *object) # 1480| { # 1481|-> FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(object); # 1482| FmDesktopItemAccessible *item; # 1483| Error: COMPILER_WARNING: [#def11] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1504:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1502| static gint fm_desktop_accessible_get_n_children(AtkObject *accessible) # 1503| { # 1504|-> FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(accessible); # 1505| # 1506| return g_list_length(priv->items); Error: COMPILER_WARNING: [#def12] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1518:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1516| return NULL; # 1517| # 1518|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(accessible); # 1519| item = g_list_nth_data(priv->items, index); # 1520| if (!item) Error: COMPILER_WARNING: [#def13] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1536:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1534| static void fm_desktop_accessible_init(FmDesktopAccessible *object) # 1535| { # 1536|-> FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(object); # 1537| # 1538| priv->items = NULL; Error: COMPILER_WARNING: [#def14] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1609:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1607| { # 1608| AtkObject *desktop_atk = gtk_widget_get_accessible(desktop); # 1609|-> FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(desktop_atk); # 1610| # 1611| return g_list_index(priv->items, item); Error: COMPILER_WARNING: [#def15] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1625:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1623| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1624| { # 1625|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1626| item_atk_l = fm_desktop_find_accessible_for_item(priv, item); # 1627| g_return_if_fail(item_atk_l != NULL); Error: COMPILER_WARNING: [#def16] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1648:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1646| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1647| { # 1648|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1649| item_atk = fm_desktop_item_accessible_new(desktop, item); # 1650| g_warn_if_fail(index <= g_list_length(priv->items)); Error: COMPILER_WARNING: [#def17] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1668:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1666| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1667| { # 1668|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1669| length = gtk_tree_model_iter_n_children(model, NULL); # 1670| g_return_if_fail(length == (gint)g_list_length(priv->items)); Error: COMPILER_WARNING: [#def18] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1691:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1689| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1690| { # 1691|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1692| item_atk_l = fm_desktop_find_accessible_for_item(priv, item); # 1693| g_return_if_fail(item_atk_l != NULL); Error: COMPILER_WARNING: [#def19] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1708:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1706| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1707| { # 1708|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1709| item_atk_l = fm_desktop_find_accessible_for_item(priv, item); # 1710| g_return_if_fail(item_atk_l != NULL); Error: COMPILER_WARNING: [#def20] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1724:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1722| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1723| { # 1724|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1725| item_atk_l = fm_desktop_find_accessible_for_item(priv, item); # 1726| g_return_if_fail(item_atk_l != NULL); Error: COMPILER_WARNING: [#def21] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:1740:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" # 1738| if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj)) # 1739| { # 1740|-> priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj); # 1741| while (priv->items) # 1742| { Error: COMPILER_WARNING (CWE-252): [#def22] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:2710:21: warning[-Wunused-result]: ignoring return value of ‘g_list_remove’ declared with attribute ‘[warn_unused_result](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-warn_005funused_005fresult-function-attribute)’ # 2708| list_desktop->data = fm_desktop_new(screen, mon_init); # 2709| } else { # 2710|-> g_list_remove(list_desktop_top, desktop); # 2711| } # 2712| } Error: COMPILER_WARNING (CWE-252): [#def23] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c: scope_hint: In function ‘on_screen_size_changed’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:2710:21: warning[-Wunused-result]: ignoring return value of ‘g_list_remove’ declared with attribute ‘warn_unused_result’ # 2710 | g_list_remove(list_desktop_top, desktop); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 2708| list_desktop->data = fm_desktop_new(screen, mon_init); # 2709| } else { # 2710|-> g_list_remove(list_desktop_top, desktop); # 2711| } # 2712| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def24] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3682:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3671:8: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3674:14: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3675:8: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3680:13: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3680:13: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3682:29: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:3682:9: danger: dereference of NULL ‘hit_test(user_data, & it, x, y)’ # 3680| else if (state == GDK_CONTROL_MASK) /* invert selection on the item */ # 3681| { # 3682|-> item->is_selected = ! item->is_selected; # 3683| } # 3684| else /* ignore other modifiers */ Error: COMPILER_WARNING (CWE-563): [#def25] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c: scope_hint: In function ‘fm_desktop_manager_init’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/desktop.c:5993:9: warning[-Wunused-variable]: unused variable ‘i’ # 5993 | int i, n_mon, scr, mon; # | ^ # 5991| { # 5992| GdkDisplay * gdpy; # 5993|-> int i, n_mon, scr, mon; # 5994| const char* desktop_path; # 5995| #if FM_CHECK_VERSION(1, 2, 0) Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:76:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:76:17: throw: if ‘g_get_current_dir’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:76:17: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 74| # 75| /* pass cwd */ # 76|-> char* cwd = g_get_current_dir(); # 77| escaped = g_strescape(cwd, NULL); # 78| fprintf(f, "%s\n", escaped); Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:77:15: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:77:15: throw: if ‘g_strescape’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:77:15: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 75| /* pass cwd */ # 76| char* cwd = g_get_current_dir(); # 77|-> escaped = g_strescape(cwd, NULL); # 78| fprintf(f, "%s\n", escaped); # 79| g_free(cwd); Error: GCC_ANALYZER_WARNING (CWE-688): [#def28] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:78:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f’ where non-null expected pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: this call could return NULL pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:78:5: danger: argument 1 (‘f’) from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected # 76| char* cwd = g_get_current_dir(); # 77| escaped = g_strescape(cwd, NULL); # 78|-> fprintf(f, "%s\n", escaped); # 79| g_free(cwd); # 80| cwd = escaped; Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:79:5: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:79:5: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:79:5: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:79:5: throw: if ‘g_free_sized’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:79:5: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 77| escaped = g_strescape(cwd, NULL); # 78| fprintf(f, "%s\n", escaped); # 79|-> g_free(cwd); # 80| cwd = escaped; # 81| Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:102:27: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:102:27: throw: if ‘g_strescape’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:102:27: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 100| if(g_str_has_prefix(str, "--")) /* strings begining with -- */ # 101| fprintf(f, "--\n"); /* prepend a -- to it */ # 102|-> escaped = g_strescape(str, NULL); # 103| fprintf(f, "%s\n", escaped); # 104| g_free(escaped); Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:104:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:104:17: throw: if ‘g_free_sized’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:104:17: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0) # 102| escaped = g_strescape(str, NULL); # 103| fprintf(f, "%s\n", escaped); # 104|-> g_free(escaped); # 105| } # 106| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:132:46: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:132:46: throw: if ‘g_getenv’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:132:46: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 130| else if(str[0] == '~' && str[1] == '/') # 131| { # 132|-> const char *envvar = g_getenv("HOME"); # 133| if(envvar) # 134| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:135:39: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:135:39: throw: if ‘g_strescape’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:135:39: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0) # 133| if(envvar) # 134| { # 135|-> escaped = g_strescape(envvar, NULL); # 136| fprintf(f, "%s", escaped); # 137| g_free(escaped); Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:137:29: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:137:29: throw: if ‘g_free_sized’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:137:29: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0) # 135| escaped = g_strescape(envvar, NULL); # 136| fprintf(f, "%s", escaped); # 137|-> g_free(escaped); # 138| str++; # 139| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:141:41: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:141:41: throw: if ‘g_uri_parse_scheme’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:141:41: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0) # 139| } # 140| } # 141|-> else if ((escaped = g_uri_parse_scheme(str))) /* a valid URI */ # 142| g_free(escaped); # 143| else if(str[0] != '/') Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:142:25: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:142:25: throw: if ‘g_free_sized’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:142:25: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0) # 140| } # 141| else if ((escaped = g_uri_parse_scheme(str))) /* a valid URI */ # 142|-> g_free(escaped); # 143| else if(str[0] != '/') # 144| fprintf(f, "%s/", cwd); Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:145:31: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:145:31: throw: if ‘g_strescape’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:145:31: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0) # 143| else if(str[0] != '/') # 144| fprintf(f, "%s/", cwd); # 145|-> escaped = g_strescape(str, NULL); # 146| fprintf(f, "%s\n", escaped); # 147| g_free(escaped); Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:147:21: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:72:15: acquire_memory: allocated here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:85:28: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:87:16: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:147:21: throw: if ‘g_free_sized’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:147:21: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0) # 145| escaped = g_strescape(str, NULL); # 146| fprintf(f, "%s\n", escaped); # 147|-> g_free(escaped); # 148| } # 149| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def39] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:200:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:200:8: danger: ‘*data.sock’ leaks here # 198| # 199| /* try to connect to existing instance */ # 200|-> if(connect(data->sock, (struct sockaddr*)&addr, addr_len) == 0) # 201| { # 202| /* connected successfully, pass args in opt_entries to server process as argv and exit. */ Error: GCC_ANALYZER_WARNING (CWE-775): [#def40] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:200:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:208:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:7: branch_false: following ‘false’ branch (when ‘ret == 0’)... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:15: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:15: danger: ‘*data.sock’ leaks here # 220| reuse = 1; # 221| ret = setsockopt( data->sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse) ); # 222|-> if(ret || bind(data->sock, (struct sockaddr*)&addr, addr_len) == -1) # 223| return SINGLE_INST_ERROR; # 224| Error: GCC_ANALYZER_WARNING (CWE-775): [#def41] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:232:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:200:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:208:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:7: branch_false: following ‘false’ branch (when ‘ret == 0’)... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:15: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:8: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:225:24: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:226:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:229:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:232:8: danger: ‘*data.sock’ leaks here # 230| g_io_channel_set_buffered(data->io_channel, FALSE); # 231| # 232|-> if(listen(data->sock, 5) == -1) # 233| return SINGLE_INST_ERROR; # 234| Error: GCC_ANALYZER_WARNING (CWE-775): [#def42] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:235:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:200:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:208:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:7: branch_false: following ‘false’ branch (when ‘ret == 0’)... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:15: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:222:8: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:225:24: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:226:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:229:5: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:232:7: branch_false: following ‘false’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:235:22: branch_false: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:235:22: danger: ‘*data.sock’ leaks here # 233| return SINGLE_INST_ERROR; # 234| # 235|-> data->io_watch = g_io_add_watch(data->io_channel, # 236| G_IO_IN|G_IO_ERR|G_IO_PRI|G_IO_HUP, # 237| (GIOFunc)on_server_socket_event, data); Error: GCC_ANALYZER_WARNING (CWE-775): [#def43] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:375:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘g_io_channel_unix_get_fd(ioc)’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:373:8: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:375:34: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:375:27: danger: ‘g_io_channel_unix_get_fd(ioc)’ leaks here # 373| if ( cond & (G_IO_IN|G_IO_PRI) ) # 374| { # 375|-> int client_sock = accept(g_io_channel_unix_get_fd(ioc), NULL, 0); # 376| if(client_sock != -1) # 377| { Error: GCC_ANALYZER_WARNING (CWE-775): [#def44] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:378:40: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(ioc), 0, 0)’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:373:8: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:375:34: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:376:11: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:378:40: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:378:40: throw: if ‘g_slice_alloc’ throws an exception... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:378:40: danger: ‘accept(g_io_channel_unix_get_fd(ioc), 0, 0)’ leaks here # 376| if(client_sock != -1) # 377| { # 378|-> SingleInstClient* client = g_slice_new0(SingleInstClient); # 379| client->channel = g_io_channel_unix_new(client_sock); # 380| g_io_channel_set_encoding(client->channel, NULL, NULL); Error: GCC_ANALYZER_WARNING (CWE-775): [#def45] pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:379:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(ioc), 0, 0)’ pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:373:8: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:375:34: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:376:11: branch_true: following ‘true’ branch... pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:378:40: branch_true: ...to here pcmanfm-1.4.0-20251022git09087446/pcmanfm/src/single-inst.c:379:31: danger: ‘accept(g_io_channel_unix_get_fd(ioc), 0, 0)’ leaks here # 377| { # 378| SingleInstClient* client = g_slice_new0(SingleInstClient); # 379|-> client->channel = g_io_channel_unix_new(client_sock); # 380| g_io_channel_set_encoding(client->channel, NULL, NULL); # 381| client->screen_num = -1;
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-58.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | pcmanfm-1.4.0^20251022git09087446-1.fc44 |
| store-results-to | /tmp/tmpma6kpw_3/pcmanfm-1.4.0^20251022git09087446-1.fc44.tar.xz |
| time-created | 2026-01-08 20:06:43 |
| time-finished | 2026-01-08 20:08:34 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpma6kpw_3/pcmanfm-1.4.0^20251022git09087446-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpma6kpw_3/pcmanfm-1.4.0^20251022git09087446-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |